package se.webbzon.boltzmann.editor.component.imagelist;

import java.awt.Image;
import java.util.Map.Entry;

import se.webbzon.oschi01.resourceset.ResourceSet;

public class ImageSetEntry implements Comparable<ImageSetEntry> {
	
	// The key to this image set entry
	private final String key;
	
	// The value of this image set entry
	private final ResourceSet<Image> value;
	
	/*============================================================
	Constructors
	============================================================*/
	
	/** Creates a new image set entry from the given entry. **/
	public ImageSetEntry(Entry<String,ResourceSet<Image>> imageEntry) {
		this.key = imageEntry.getKey();
		this.value = imageEntry.getValue();
	}
	
	/*============================================================
	Public Methods
	============================================================*/
	
	/** Returns the name of the image set associated with this entry. **/
	public String getImageSetName() {
		return key;
	}
	
	/** Returns the image set associated with this entry. **/
	public ResourceSet<Image> getImageSet() {
		return value;
	}
	
	@Override public int compareTo(ImageSetEntry other) {
		return key.compareTo(other.key);
	}

}
